﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#include <QDialog>
#include <QLineEdit>
#include <QComboBox>
#include <QTableWidget>
#include <QListWidget>
#include <QScrollArea>
#include <QGroupBox>
#include <QValidator>
#include "GmepUIBase.h"

class GMEP_UI_BASE_EXPORT QtFormValueValidator : public QObject
{
    Q_OBJECT 
public:
    static QtFormValueValidator &GetInstance();
    void RegularValidatorCheck(QObjectList list);
    bool HasInvalidValue(QObjectList list);

    private Q_SLOTS:
    void QLineEdit_RegularValidator(const QString &text);
    void QComboBox_RegularValidator(const QString &text);
    void QListWidget_RegularValidator();//QListWidgetItem *item
    void QTableWidget_RegularValidator(int row, int column);

private:
    QtFormValueValidator();
    ~QtFormValueValidator();
    void showState(QWidget* widget,const QString& textBackgroundColor);

private:
    static QStringList dataTypeList;
};

